//
//  YZYSaccountStore.h
//  Candy2
//
//  Created by Aiwa on 11/2/15.
//  Copyright © 2015 Aiwa. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface YZYSaccountStore : NSObject

+ (YZYSaccountStore*)sharedInstance;

- (void)saveAccessToken:(NSString*)accessToken;
- (NSString*)getAccessToken;
- (void)removeAccessToken;

- (void)saveUserInfoStr:(NSString*)userInfoStr;
- (NSString*)getUserInfoStr;
- (void)removeUserInfoStr;

- (void)saveUserIdentifier:(NSString*)userIdentifier;
- (NSString*)getUserIdentifier;
- (void)removeUserIdentifier;

- (void)saveIsScoreOpen:(BOOL)isScoreOpen;
- (BOOL)getIsScoreOpen;

- (void)saveAgreeSelected:(BOOL)isSelected;
- (BOOL)getAgreeSelected;

///登录失效，重新登录
- (void)reLogin;

//得到时间戳字符串
+ (NSString *)getTsString;

- (void)getCurrentWindowWithCompletion:(void (^)(UIWindow *window))completion;
- (void)makeToastFromWindow:(NSString *)message;
- (void)makeAlertViewFromWindow:(NSString *)message;

- (UIImage *)getImage:(NSString *)imageStr;

//获取当前时间戳
- (NSString *)currentTimeStr;

//根据颜色生成图片
- (UIImage*)imageWithColor:(UIColor*)color;

- (void)showHUDAddedToWindow;
- (void)hideHUDForWindow;

@end
